home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicComboPopup$InvocationMouseMotionHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.7 KB  |  56 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.Point;
  4. import java.awt.Rectangle;
  5. import java.awt.event.MouseEvent;
  6. import java.awt.event.MouseMotionAdapter;
  7.  
  8. public class BasicComboPopup$InvocationMouseMotionHandler extends MouseMotionAdapter {
  9.    // $FF: synthetic field
  10.    private final BasicComboPopup this$0;
  11.  
  12.    protected BasicComboPopup$InvocationMouseMotionHandler(BasicComboPopup var1) {
  13.       this.this$0 = var1;
  14.    }
  15.  
  16.    public void mouseDragged(MouseEvent var1) {
  17.       if (this.this$0.isVisible()) {
  18.          MouseEvent var2 = this.this$0.convertMouseEvent(var1);
  19.          Rectangle var3 = new Rectangle();
  20.          this.this$0.list.computeVisibleRect(var3);
  21.          if (var2.getPoint().y >= var3.y) {
  22.             int var10001 = var3.y + var3.height;
  23.             if (var2.getPoint().y <= var10001 - 1) {
  24.                this.this$0.hasEntered = true;
  25.                if (this.this$0.isAutoScrolling) {
  26.                   this.this$0.stopAutoScrolling();
  27.                }
  28.  
  29.                Point var5 = var2.getPoint();
  30.                if (var3.contains(var5)) {
  31.                   this.this$0.valueIsAdjusting = true;
  32.                   this.this$0.updateListBoxSelectionForEvent(var2, false);
  33.                   this.this$0.valueIsAdjusting = false;
  34.                }
  35.  
  36.                return;
  37.             }
  38.          }
  39.  
  40.          if (this.this$0.hasEntered) {
  41.             int var4 = var2.getPoint().y < var3.y ? 0 : 1;
  42.             if (this.this$0.isAutoScrolling && this.this$0.scrollDirection != var4) {
  43.                this.this$0.stopAutoScrolling();
  44.                this.this$0.startAutoScrolling(var4);
  45.             } else if (!this.this$0.isAutoScrolling) {
  46.                this.this$0.startAutoScrolling(var4);
  47.             }
  48.          } else if (var1.getPoint().y < 0) {
  49.             this.this$0.hasEntered = true;
  50.             this.this$0.startAutoScrolling(0);
  51.          }
  52.       }
  53.  
  54.    }
  55. }
  56.